<div class="ui-amp-container">
  <h2><?php echo __('Capabilities') ?>
    <?php echo $actions->buildIndexLinks() ?></h2>

  <?php if (!empty($caps)) { ?>
  <table class="ui-amp-table">
    <?php 
    echo $this->AmpIndex->headers(array(
      array(__('Id'), 'cap.id', array('class'=>'min')),
      array(__('Name'), 'cap.id'),
      array(__('Policy'), 'cap.id'),
      array(__('Expression'), 'cap.id'),
      __('Actions')
    ));

    foreach ($caps as $cap) {
      echo $this->AmpIndex->tr(
        '<td class="center">'.$cap->get('id').'</td>',
        '<td class="center">'.$cap->get('name').'</td>',
        '<td class="center">'.$policy[$cap->get('policy')].'</td>',
        '<td class="center">'.$cap->get('regex').'</td>',
        '<td class="center">'.$actions->buildIndexActions($cap).'</td>'
      );
    }
    ?>
  </table>
  <?php } else { ?>
  <p><?php echo __('Zero capabilities found.') ?></p>
  <?php } ?>
</div>